package com.heng.futureDemo;

import jdk.jfr.DataAmount;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

public class AChainDemo6 {
    public static void main(String[] args) {

        Student student = new Student();
        student.setId(1);
        student.setStudentName("z3");
        student.setMajor("cs");

        //链式编程
        student.setId(12).setStudentName("li4").setMajor("E");
    }
}


@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
class Student {
    private Integer id;
    private String studentName;
    private String major;
}
